<?php
/**
 * Author：晴天 QQ：1186258278
 * Creation：2020/2/29 19:44
 * Filename：confiig.php
 * 数据库配置文件
 */

namespace Medoo\DB;

use Medoo\Medoo;

class SQL
{
    /**
     * @return Medoo PDO操作类
     */
    public static function DB()
    {
        global $dbconfig;
        return new Medoo([
            'database_type' => 'mysql',
            'database_name' => $dbconfig['dbname'],
            'server' => $dbconfig['host'],
            'username' => $dbconfig['user'],
            'password' => $dbconfig['pwd'],
            'charset' => 'utf8',
            'port' => $dbconfig['port'],
            'prefix' => 'sky_',
        ]);
    }
}

